package cn.com.api.mapper.base;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.*;

import cn.com.api.entity.ApiU_dynamic_remind;

//DAO
public interface U_dynamic_remindMapperBase {

	// 根据id查看
	@Select("SELECT * FROM U_DYNAMIC_REMIND  WHERE ID = #{id}")
	public ApiU_dynamic_remind findU_dynamic_remindById(Integer id);

	// 查看数据集
	@Select("SELECT * FROM U_dynamic_remind")
	public List<ApiU_dynamic_remind> findU_dynamic_reminds();

	// 根据条件查看数据集
	public List<Map<String, Object>> findU_dynamic_remindsByMap(HashMap condition);

	// 添加
	@Insert("INSERT INTO U_DYNAMIC_REMIND (DYNAMIC_ID, USER_ID, UPDATE_TIME, IS_READ) VALUES (#{dynamic_id}, #{user_id}, #{update_time}, #{is_read})")
	@Options(useGeneratedKeys = true, keyProperty = "id")
	public int insertU_dynamic_remind(ApiU_dynamic_remind u_dynamic_remind);

	// 修改
	@Update("UPDATE U_DYNAMIC_REMIND SET DYNAMIC_ID = #{dynamic_id}, USER_ID = #{user_id}, UPDATE_TIME = #{update_time}, IS_READ = #{is_read} WHERE ID = #{id}")
	public int updateU_dynamic_remind(ApiU_dynamic_remind u_dynamic_remind);

	// 删除
	@Delete("DELETE FROM U_DYNAMIC_REMIND  WHERE ID = #{id}")
	public int deleteU_dynamic_remind(Integer id);

	// Foreign keys revelant

	// region Indexs revelant

}
